package com.wnxy.stu.api;

import com.wnxy.common.entity.Stu;
import com.wnxy.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author yellow Docter
 * @date 2024 -04-17
 * @desc
 */
@FeignClient(contextId = "stuProductApi",value = "stu-product",path="stu")
public interface StuProductApi {

    @GetMapping("/list")
    public Result list();

    @GetMapping("/list/{id}")
    public Result listById(@PathVariable("id") Integer id);

    @GetMapping("list/{currentPage}/{pageSize}")
    public Result listByPages(@PathVariable("currentPage") Integer currentPage,@PathVariable("pageSize") Integer pageSize);

    @PostMapping("add")
    public Result add(@RequestBody Stu stu);
    @DeleteMapping("remove/{id}")
    public Result remove(@PathVariable("id") Integer id);

    @PutMapping("update")
    public Result update(@RequestBody Stu stu);

}
